package com.dongdongshop.api.fallback;

import com.dongdongshop.api.GoodsServiceApi;
import com.dongdongshop.data.Result;

import com.dongdongshop.dto.ItemDto;
import com.dongdongshop.enums.ResultEnums;
import org.springframework.stereotype.Component;

import java.util.List;


@Component
public class GoodsServiceApiFallback implements GoodsServiceApi {

    @Override
    public Result<ItemDto> getItem(Long itemId) {
        return Result.response(ResultEnums.INEFFECTIVE);
    }

    @Override
    public Result subStockCount(List<ItemDto> itemDTOList) {
        return Result.response(ResultEnums.FALLBACK);
    }
}
